function [] = print4(fileID,input,dim1,dim2,dim3,dim4)

    for i=1:dim1
        for j=1:dim2
            for k=1:dim3
                for m=1:dim4
                    fprintf(fileID, '%e ',input(i, j, k, m));
                end
            end
        end
    end
    fclose(fileID);

end

